This invention relates to an optical sensor for determining one or more parameters in a liquid or gaseous sample, comprising a substrate which is provided with carrier particles and a fluorescent indicator immobilized thereon, and to a method of producing such a sensor.